﻿using System;
using System.CodeDom.Compiler;
using System.Diagnostics;
using Google.Protobuf;
using Google.Protobuf.Reflection;

namespace EggLink.DanhengServer.Proto
{
	// Token: 0x02000FA3 RID: 4003
	[DebuggerDisplay("{ToString(),nq}")]
	public sealed class RogueModifier : IMessage<RogueModifier>, IMessage, IEquatable<RogueModifier>, IDeepCloneable<RogueModifier>, IBufferMessage
	{
		// Token: 0x170032BC RID: 12988
		// (get) Token: 0x0600B356 RID: 45910 RVA: 0x001E45D8 File Offset: 0x001E27D8
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public static MessageParser<RogueModifier> Parser
		{
			get
			{
				return RogueModifier._parser;
			}
		}

		// Token: 0x170032BD RID: 12989
		// (get) Token: 0x0600B357 RID: 45911 RVA: 0x001E45DF File Offset: 0x001E27DF
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public static MessageDescriptor Descriptor
		{
			get
			{
				return RogueModifierReflection.Descriptor.MessageTypes[0];
			}
		}

		// Token: 0x170032BE RID: 12990
		// (get) Token: 0x0600B358 RID: 45912 RVA: 0x001E45F1 File Offset: 0x001E27F1
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		MessageDescriptor IMessage.Descriptor
		{
			get
			{
				return RogueModifier.Descriptor;
			}
		}

		// Token: 0x0600B359 RID: 45913 RVA: 0x001E45F8 File Offset: 0x001E27F8
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public RogueModifier()
		{
		}

		// Token: 0x0600B35A RID: 45914 RVA: 0x001E4600 File Offset: 0x001E2800
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public RogueModifier(RogueModifier other) : this()
		{
			this.modifierContent_ = ((other.modifierContent_ != null) ? other.modifierContent_.Clone() : null);
			this.modifierId_ = other.modifierId_;
			this.modifierSourceType_ = other.modifierSourceType_;
			if (other.OLICFDPFLOECase == RogueModifier.OLICFDPFLOEOneofCase.ModifierInfo)
			{
				this.ModifierInfo = other.ModifierInfo.Clone();
			}
			this._unknownFields = UnknownFieldSet.Clone(other._unknownFields);
		}

		// Token: 0x0600B35B RID: 45915 RVA: 0x001E4676 File Offset: 0x001E2876
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public RogueModifier Clone()
		{
			return new RogueModifier(this);
		}

		// Token: 0x170032BF RID: 12991
		// (get) Token: 0x0600B35C RID: 45916 RVA: 0x001E467E File Offset: 0x001E287E
		// (set) Token: 0x0600B35D RID: 45917 RVA: 0x001E4686 File Offset: 0x001E2886
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public RogueModifierContent ModifierContent
		{
			get
			{
				return this.modifierContent_;
			}
			set
			{
				this.modifierContent_ = value;
			}
		}

		// Token: 0x170032C0 RID: 12992
		// (get) Token: 0x0600B35E RID: 45918 RVA: 0x001E468F File Offset: 0x001E288F
		// (set) Token: 0x0600B35F RID: 45919 RVA: 0x001E4697 File Offset: 0x001E2897
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public ulong ModifierId
		{
			get
			{
				return this.modifierId_;
			}
			set
			{
				this.modifierId_ = value;
			}
		}

		// Token: 0x170032C1 RID: 12993
		// (get) Token: 0x0600B360 RID: 45920 RVA: 0x001E46A0 File Offset: 0x001E28A0
		// (set) Token: 0x0600B361 RID: 45921 RVA: 0x001E46A8 File Offset: 0x001E28A8
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public RogueModifierSourceType ModifierSourceType
		{
			get
			{
				return this.modifierSourceType_;
			}
			set
			{
				this.modifierSourceType_ = value;
			}
		}

		// Token: 0x170032C2 RID: 12994
		// (get) Token: 0x0600B362 RID: 45922 RVA: 0x001E46B1 File Offset: 0x001E28B1
		// (set) Token: 0x0600B363 RID: 45923 RVA: 0x001E46CD File Offset: 0x001E28CD
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public ChessRogueModifierInfo ModifierInfo
		{
			get
			{
				if (this.oLICFDPFLOECase_ != RogueModifier.OLICFDPFLOEOneofCase.ModifierInfo)
				{
					return null;
				}
				return (ChessRogueModifierInfo)this.oLICFDPFLOE_;
			}
			set
			{
				this.oLICFDPFLOE_ = value;
				this.oLICFDPFLOECase_ = ((value == null) ? RogueModifier.OLICFDPFLOEOneofCase.None : RogueModifier.OLICFDPFLOEOneofCase.ModifierInfo);
			}
		}

		// Token: 0x170032C3 RID: 12995
		// (get) Token: 0x0600B364 RID: 45924 RVA: 0x001E46E7 File Offset: 0x001E28E7
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public RogueModifier.OLICFDPFLOEOneofCase OLICFDPFLOECase
		{
			get
			{
				return this.oLICFDPFLOECase_;
			}
		}

		// Token: 0x0600B365 RID: 45925 RVA: 0x001E46EF File Offset: 0x001E28EF
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public void ClearOLICFDPFLOE()
		{
			this.oLICFDPFLOECase_ = RogueModifier.OLICFDPFLOEOneofCase.None;
			this.oLICFDPFLOE_ = null;
		}

		// Token: 0x0600B366 RID: 45926 RVA: 0x001E46FF File Offset: 0x001E28FF
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public override bool Equals(object other)
		{
			return this.Equals(other as RogueModifier);
		}

		// Token: 0x0600B367 RID: 45927 RVA: 0x001E4710 File Offset: 0x001E2910
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public bool Equals(RogueModifier other)
		{
			return other != null && (other == this || (object.Equals(this.ModifierContent, other.ModifierContent) && this.ModifierId == other.ModifierId && this.ModifierSourceType == other.ModifierSourceType && object.Equals(this.ModifierInfo, other.ModifierInfo) && this.OLICFDPFLOECase == other.OLICFDPFLOECase && object.Equals(this._unknownFields, other._unknownFields)));
		}

		// Token: 0x0600B368 RID: 45928 RVA: 0x001E4794 File Offset: 0x001E2994
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public override int GetHashCode()
		{
			int num = 1;
			if (this.modifierContent_ != null)
			{
				num ^= this.ModifierContent.GetHashCode();
			}
			if (this.ModifierId != 0UL)
			{
				num ^= this.ModifierId.GetHashCode();
			}
			if (this.ModifierSourceType != RogueModifierSourceType.RogueModifierSourceNone)
			{
				num ^= this.ModifierSourceType.GetHashCode();
			}
			if (this.oLICFDPFLOECase_ == RogueModifier.OLICFDPFLOEOneofCase.ModifierInfo)
			{
				num ^= this.ModifierInfo.GetHashCode();
			}
			num ^= (int)this.oLICFDPFLOECase_;
			if (this._unknownFields != null)
			{
				num ^= this._unknownFields.GetHashCode();
			}
			return num;
		}

		// Token: 0x0600B369 RID: 45929 RVA: 0x001E482C File Offset: 0x001E2A2C
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public override string ToString()
		{
			return JsonFormatter.ToDiagnosticString(this);
		}

		// Token: 0x0600B36A RID: 45930 RVA: 0x001E4834 File Offset: 0x001E2A34
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public void WriteTo(CodedOutputStream output)
		{
			output.WriteRawMessage(this);
		}

		// Token: 0x0600B36B RID: 45931 RVA: 0x001E4840 File Offset: 0x001E2A40
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		void IBufferMessage.InternalWriteTo(ref WriteContext output)
		{
			if (this.modifierContent_ != null)
			{
				output.WriteRawTag(42);
				output.WriteMessage(this.ModifierContent);
			}
			if (this.ModifierSourceType != RogueModifierSourceType.RogueModifierSourceNone)
			{
				output.WriteRawTag(96);
				output.WriteEnum((int)this.ModifierSourceType);
			}
			if (this.ModifierId != 0UL)
			{
				output.WriteRawTag(112);
				output.WriteUInt64(this.ModifierId);
			}
			if (this.oLICFDPFLOECase_ == RogueModifier.OLICFDPFLOEOneofCase.ModifierInfo)
			{
				output.WriteRawTag(162, 57);
				output.WriteMessage(this.ModifierInfo);
			}
			if (this._unknownFields != null)
			{
				this._unknownFields.WriteTo(ref output);
			}
		}

		// Token: 0x0600B36C RID: 45932 RVA: 0x001E48DC File Offset: 0x001E2ADC
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public int CalculateSize()
		{
			int num = 0;
			if (this.modifierContent_ != null)
			{
				num += 1 + CodedOutputStream.ComputeMessageSize(this.ModifierContent);
			}
			if (this.ModifierId != 0UL)
			{
				num += 1 + CodedOutputStream.ComputeUInt64Size(this.ModifierId);
			}
			if (this.ModifierSourceType != RogueModifierSourceType.RogueModifierSourceNone)
			{
				num += 1 + CodedOutputStream.ComputeEnumSize((int)this.ModifierSourceType);
			}
			if (this.oLICFDPFLOECase_ == RogueModifier.OLICFDPFLOEOneofCase.ModifierInfo)
			{
				num += 2 + CodedOutputStream.ComputeMessageSize(this.ModifierInfo);
			}
			if (this._unknownFields != null)
			{
				num += this._unknownFields.CalculateSize();
			}
			return num;
		}

		// Token: 0x0600B36D RID: 45933 RVA: 0x001E4968 File Offset: 0x001E2B68
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public void MergeFrom(RogueModifier other)
		{
			if (other == null)
			{
				return;
			}
			if (other.modifierContent_ != null)
			{
				if (this.modifierContent_ == null)
				{
					this.ModifierContent = new RogueModifierContent();
				}
				this.ModifierContent.MergeFrom(other.ModifierContent);
			}
			if (other.ModifierId != 0UL)
			{
				this.ModifierId = other.ModifierId;
			}
			if (other.ModifierSourceType != RogueModifierSourceType.RogueModifierSourceNone)
			{
				this.ModifierSourceType = other.ModifierSourceType;
			}
			if (other.OLICFDPFLOECase == RogueModifier.OLICFDPFLOEOneofCase.ModifierInfo)
			{
				if (this.ModifierInfo == null)
				{
					this.ModifierInfo = new ChessRogueModifierInfo();
				}
				this.ModifierInfo.MergeFrom(other.ModifierInfo);
			}
			this._unknownFields = UnknownFieldSet.MergeFrom(this._unknownFields, other._unknownFields);
		}

		// Token: 0x0600B36E RID: 45934 RVA: 0x001E4A15 File Offset: 0x001E2C15
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public void MergeFrom(CodedInputStream input)
		{
			input.ReadRawMessage(this);
		}

		// Token: 0x0600B36F RID: 45935 RVA: 0x001E4A20 File Offset: 0x001E2C20
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		void IBufferMessage.InternalMergeFrom(ref ParseContext input)
		{
			uint num;
			while ((num = input.ReadTag()) != 0U)
			{
				if (num <= 96U)
				{
					if (num == 42U)
					{
						if (this.modifierContent_ == null)
						{
							this.ModifierContent = new RogueModifierContent();
						}
						input.ReadMessage(this.ModifierContent);
						continue;
					}
					if (num == 96U)
					{
						this.ModifierSourceType = (RogueModifierSourceType)input.ReadEnum();
						continue;
					}
				}
				else
				{
					if (num == 112U)
					{
						this.ModifierId = input.ReadUInt64();
						continue;
					}
					if (num == 7330U)
					{
						ChessRogueModifierInfo chessRogueModifierInfo = new ChessRogueModifierInfo();
						if (this.oLICFDPFLOECase_ == RogueModifier.OLICFDPFLOEOneofCase.ModifierInfo)
						{
							chessRogueModifierInfo.MergeFrom(this.ModifierInfo);
						}
						input.ReadMessage(chessRogueModifierInfo);
						this.ModifierInfo = chessRogueModifierInfo;
						continue;
					}
				}
				this._unknownFields = UnknownFieldSet.MergeFieldFrom(this._unknownFields, ref input);
			}
		}

		// Token: 0x04004883 RID: 18563
		private static readonly MessageParser<RogueModifier> _parser = new MessageParser<RogueModifier>(() => new RogueModifier());

		// Token: 0x04004884 RID: 18564
		private UnknownFieldSet _unknownFields;

		// Token: 0x04004885 RID: 18565
		public const int ModifierContentFieldNumber = 5;

		// Token: 0x04004886 RID: 18566
		private RogueModifierContent modifierContent_;

		// Token: 0x04004887 RID: 18567
		public const int ModifierIdFieldNumber = 14;

		// Token: 0x04004888 RID: 18568
		private ulong modifierId_;

		// Token: 0x04004889 RID: 18569
		public const int ModifierSourceTypeFieldNumber = 12;

		// Token: 0x0400488A RID: 18570
		private RogueModifierSourceType modifierSourceType_;

		// Token: 0x0400488B RID: 18571
		public const int ModifierInfoFieldNumber = 916;

		// Token: 0x0400488C RID: 18572
		private object oLICFDPFLOE_;

		// Token: 0x0400488D RID: 18573
		private RogueModifier.OLICFDPFLOEOneofCase oLICFDPFLOECase_;

		// Token: 0x02001CAF RID: 7343
		public enum OLICFDPFLOEOneofCase
		{
			// Token: 0x0400685A RID: 26714
			None,
			// Token: 0x0400685B RID: 26715
			ModifierInfo = 916
		}
	}
}
